/* $VER: QuickSearch.awebrx 1.2 (28.3.00) (c) Neil Bothwick, Wirenet QuickSearch - Searches the index of the current CD */ /* ;;; Initialise */ options results CDname = 'AACD10:' IndexFile = CDName'CDTools/indices/'compress(CDName,':') TempFile = 'T:QuickSearch.temp' ResultFile = 'T:QuickSearch.html' if ~show('L','rexxsupport.library') then call addlib('rexxsupport.library',0,-30,0) if ~show('L','rexxdossupport.library') then call addlib('rexxdossupport.library',0,-30,0) AWebPort = address() if ~abbrev(AWebPort,'AWEB.') then do do i = 1 to 25 if show('P','AWEB.'i) then do AWebPort = 'AWEB.'i leave end end if ~abbrev(AWebPort,'AWEB.') then exit address(AWebPort) end 'get url target=main' OldPage = result 'open file://localhost/'CDName'html/Searching.html target main reload' ;;; /* ;;; Search index file */ parse arg SearchStr if abbrev(SearchStr,'SearchStr="') then parse var SearchStr . '="' SearchStr '"' SearchStr = translate(SearchStr,' ','+') address command CDName'System/C/FlashFind >'TempFile IndexFile '"'SearchStr'" NOPREFS QUIET NH' if RC > 0 then Found = 'NO' ;;; /* ;;; Open output file and write headers */ call open(out,ResultFile,'W') call writeln(out,'') call writeln(out,'
') call writeln(out,'
') end else do call open(in,TempFile,'R') call writeln(out,'
'name' | 'path'' call writeln(out,line) end call writeln(out,' |
') call writeln(out,'') ;;; /* ;;; Close files and load into AWeb */ call close(in) call close(out) address command 'delete >NIL:' TempFile 'open file://localhost/'ResultFile' target main reload' 'wait file://localhost/'ResultFile address command 'delete >NIL:' ResultFile ;;; exit